package labb4;

public abstract class Component {
    protected String name;
    protected double weight;
        
    public Component(String name, double weight){
        this.name = name;
        this.weight = weight;
    }
    
    public double getWeight(){
        return weight;
    }
    
    @Override
    public String toString(){
        return name;
    }
}
